class Solution {
public:
    int uniquePaths(int m, int n) {
        return dfs(m, n);
    }
 
    int dfs(int sr, int sc)
    {
        if(sr == 0 || sc == 0)
            return 0;
        if(sr == 1 && sc == 1)
            return 1;
        return dfs(sr - 1, sc) + dfs(sr, sc - 1);
    }
};